package com.example.clock.ChangeTips;

import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import androidx.annotation.ColorRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.example.clock.R;
import com.example.clock.basicClass.Plan;

import org.w3c.dom.Text;

import java.util.ArrayList;
import java.util.List;

public class tipsAdapter extends ArrayAdapter<String>{
    public tipsAdapter(@NonNull Context context, int resource, @NonNull String[] objects){
        super(context,resource,objects);
    }

    @NonNull
    @Override
    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {

        String s= getItem(position);//得到当前项的实例
        //为每一个子项加载设定的布局
        View view= LayoutInflater.from(getContext()).inflate(R.layout.list_item_tips,parent,false);
        TextView v =  view.findViewById(R.id.textView50);
        v.setText(s);
        return view;
    }
}
